From: Guido Günther Date: Sun, 4 Jan 2026 12:07:29 +0000 (+0100) Subject: mixer-control: Let sink update handle active output change X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2^2^2^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=39a67950f79f52befc338093883a20bb8b90e0fa;p=gnome-shell.git mixer-control: Let sink update handle active output change A signal is emitted when the output changes so don't set it right away as the stream might change port. Signed-off-by: Guido Günther Origin: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/34 Bug-Debian: https://bugs.debian.org/1126514 Applied-upstream: gnome-shell 50, commit:798230599950607ec285daecd070f5bcb28580e4 Gbp-Pq: Topic libgvc Gbp-Pq: Name mixer-control-Let-sink-update-handle-active-output-change.patch --- diff --git a/subprojects/gvc/gvc-mixer-control.c b/subprojects/gvc/gvc-mixer-control.c index 74f9193a1..45ae31447 100644 --- a/subprojects/gvc/gvc-mixer-control.c +++ b/subprojects/gvc/gvc-mixer-control.c @@ -639,23 +639,11 @@ gvc_mixer_control_change_output (GvcMixerControl *control, /* Finally if we are not on the correct stream, swap over. */ if (stream != default_stream) { - GvcMixerUIDevice* device; - g_debug ("Attempting to swap over to stream %s ", gvc_mixer_stream_get_description (stream)); - if (gvc_mixer_control_set_default_sink (control, stream)) { - device = gvc_mixer_control_lookup_device_from_stream (control, stream); - g_signal_emit (G_OBJECT (control), - signals[ACTIVE_OUTPUT_UPDATE], - 0, - gvc_mixer_ui_device_get_id (device)); - } else { - /* If the move failed for some reason reset the UI. */ - device = gvc_mixer_control_lookup_device_from_stream (control, default_stream); - g_signal_emit (G_OBJECT (control), - signals[ACTIVE_OUTPUT_UPDATE], - 0, - gvc_mixer_ui_device_get_id (device)); + if (!gvc_mixer_control_set_default_sink (control, stream)) { + g_warning ("Failed to set default sink from output %s", + gvc_mixer_ui_device_get_description (output)); } } }